Open
Conversation
We get relatively frequent vulnerability scans to the sitemaps endpoint, attempting to post data. We should handle this.
2ab14fa to
caf1587
Compare
koetsier
requested changes
Feb 4, 2026
| serve_from_s3(sitemap) | ||
| end | ||
|
|
||
| post "/sitemaps/*" do |
Contributor
There was a problem hiding this comment.
I'm not sure this will fix it. The error in Sentry is Invalid multipart/form-data: Rack::Multipart::EmptyContentError (Sinatra::BadRequest) I think this is a bot sending a broken http request to the sitemaps endpoint
It's probably better to catch the Sinatra::BadRequest error like:
error Sinatra::BadRequest do
status 400
"Bad request"
end
Contributor
Author
There was a problem hiding this comment.
Maybe we need both? If a bot sends a valid body it would hit the post route right?
Contributor
There was a problem hiding this comment.
I'm actually not sure what would happen. Maybe it would return a 404? We could try it out using curl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We get relatively frequent vulnerability scans to the sitemaps endpoint, attempting to post data. We should handle this.
